<h1><?php echo $this->title; ?></h1>

<?php if (is_object($this->users) && $this->users->count()): ?>
    <table id="table_users_list">
        <thead>
            <tr>
                <th><?php echo $this->translate('Логин'); ?></th>
                <th><?php echo $this->translate('e-mail'); ?></th>
                <th><?php echo $this->translate('Зарегистрирован'); ?></th>
                <th><?php echo $this->translate('Действие'); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($this->users as $user) : ?>
                <tr>
                    <td>
                        <?php echo $user->login; ?>
                    </td>
                    <td><a href="mailto:<?php echo $user->email; ?>"><?php echo $user->email; ?></a></td>
                    <td><?php echo $user->created_at; ?></td>
                    <td>
                        <a href="<?php echo $this->url(array(
                            'module'=>'users',
                            'controller'=>'index',
                            'action'=>'edit',
                            'id'=>$user->id,
                        ), 'default', true); ?>"><?php echo $this->translate('Редактировать'); ?></a>
                        <a href="<?php echo $this->url(array(
                            'module'=>'users',
                            'controller'=>'index',
                            'action'=>'delete',
                            'id'=>$user->id,
                        ), 'default', true); ?>"><?php echo $this->translate('Удалить'); ?></a>
                    </td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
<br />

<?php echo $this->paginator; ?>

<?php else: ?>
    <?php echo $this->infoMessage($this->translate('Пока еще нет пользователей.')); ?>
<?php endif; ?>
